{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "da2aa148-429c-4278-9271-0986ecee1cbb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "TaskInfo(task_uid=15, index_uid='Buddhism', status='enqueued', type='indexDeletion', enqueued_at=datetime.datetime(2025, 4, 6, 8, 23, 54, 590300))"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import meilisearch\n",
    "import json\n",
    "\n",
    "client = meilisearch.Client('http://localhost:7700', 'rmuds5OuiWit9ccjQdTnjOUG3zvKi-ayIwunj3R0ums')\n",
    "with open('佛说阿弥陀经.chunks.json', encoding='utf-8') as data:\n",
    "        chunks = json.load(data)\n",
    "    \n",
    "client.index('Buddhism').add_documents(chunks)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "702f064b-6d80-4c08-b717-7ef8ebf3a750",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
